package com.atguigu.netty.http;

import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import io.netty.handler.codec.http.HttpServerCodec;


public class TestServerInitializer extends ChannelInitializer {
    @Override
    protected void initChannel(Channel ch) throws Exception {
        ch.pipeline()
                // http编解码处理器
                .addLast("codec",new HttpServerCodec())
                // 自定义处理器
                .addLast("httpServer",new TestHttpServerHandler());
    }
}
